<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title></title>
		<style>
		  .hammer{
		    width: 200px;
		    height: 200px;
		    background: #ccc;
		    margin: 200px auto;
		  }
		</style>
	</head>
	<body>
	  <div class="hammer"></div>
	  
	  <script src="js/hammer.js"></script>
	  
	  <script>
	    let dom =document.querySelector(".hammer");
	    
	    let hammer = new Hammer(dom);
	    hammer.on('tap',e=>{
	      console.log("tap",e)
	    })
	    hammer.on('press',e=>{
	      console.log("press",e)
	    })
	    //300px/s才触发
	    hammer.on('swipe',e=>{
	      console.log("swipe",e)
	    })
	    hammer.on('pan',e=>{
	      console.log("pan",e)
	    })
	  </script>
	</body>
</html>
